Page({
  data: {
    audio_src:null,
  },
  start: function () {
    // let that=this;
    let luyin = wx.getRecorderManager();
    luyin.start({
      format: "mp3",
      success: luyin.onStart((res) => {
        console.log("录音开始");
      })
    });
  },
  stop: function () {
    let that=this;
    let luyin = wx.getRecorderManager();
    luyin.stop({
      success:luyin.onStop((res) => {
        console.log("录音结束");
        console.log(res);
        that.setData({
          audio_src:res.tempFilePath,
        });
      })
    });
  }
})